var express = require('express');
var router = express.Router();
var multiparty = require('multiparty');
const DateModule = require('../../database/user')

/* GET home page. */
router.get('/index',async function(req, res, next) {
  const {userId} = req.query
  console.log(userId)
  const find = await DateModule.gexxlsModel.find({userId:userId})
  res.send({
    code:200,
    date:find
  });
});

router.get('/indexs',async function(req, res, next) {
  const find = await DateModule.PushModel.find()
  res.send({
    code:200,
    data:find
  });
});



router.post('/xxls',async function(req, res, next) {
  await DateModule.gexxlsModel.create(req.body)
  res.send({
    code:200
  });
});



module.exports = router;